const RongIMLib = require('../../libs/RongIMLib-3.0.6-dev');

const Connection = require('./connection.js');
const User = require('./user.js');
const RTC = require('./rtc.js');

module.exports = (config) => {
  const im = RongIMLib.init({ appkey: config.APPKEY });
  return {
    User: User(),
    Connection: Connection({
      im
    }),
    RTC: RTC(config,  RongIMLib)
  };
};